package cn.dubito.miaosha.param;

import cn.dubito.miaosha.validator.annotation.IsMobile;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.NotNull;

/**
 * @author liliang
 * @description:
 * @date 2018/3/29.
 */
public class LoginParam {

    @NotNull
    @IsMobile
    private String mobile;

    @NotBlank
    @Length(min = 32)
    private String password;

    public LoginParam() {
    }

    public LoginParam(String mobile, String password) {
        this.mobile = mobile;
        this.password = password;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Override
    public String toString() {
        return "LoginParam{" +
                "mobile=" + mobile +
                ", password='" + password + '\'' +
                '}';
    }
}
